package com.example.smart.dialog

import android.app.Activity
import android.view.Gravity
import android.view.View
import com.example.lib.extend.getDeviceWidth
import com.example.lib.extend.setOnDoubleClickListener
import com.example.smart.base.dialog.base.BaseDialog
import com.example.smart.databinding.DialogReservationSuccessBinding

class ReservationSuccessDialog(val activity: Activity) :
    BaseDialog<DialogReservationSuccessBinding>(dialogContext = activity,
        width = (getDeviceWidth(activity) * 0.8).toInt(),
        gravity = Gravity.CENTER) {

    override fun setLayoutRes() = com.example.smart.R.layout.dialog_reservation_success

    override fun afterViewCreate(view: View?) {
        banCancel()

        binding.DialogDone.setOnDoubleClickListener {
            dismiss()
            activity.finish()
        }

        binding.DialogEdit.setOnDoubleClickListener {
            dismiss()
        }

    }
}